import java.util.Scanner;
import java.util.Random;
public class javademo {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        Random random = new Random();
        // 默认随机种子是系统时间
        int point = random.nextInt(100);
        //生成1~100的随机数
        while (true) {
            System.out.println("请输入你认为的数字");
            int input = scanner.nextInt();
            if (input == point) {
                System.out.println("恭喜你，答对了");
                break;
            } else if (input < point) {
                System.out.println("猜小了");
            } else {
                System.out.println("猜大了");
            }
        }
        scanner.close();
    }
}
    //public static void main1(String[] args) {
     //   int a=1;
       // switch(a){
            //case 表达式1
                //语句1
               // break;
           // case 表达式2
               // 语句2
               // break
            //defualt
            //break


